/*
 * Copyright (c) 2023, 2023,yzc.cn All rights reserved.
 *
 */
package cn.yzc.dao.impl;

import cn.yzc.dao.OrderDetailsDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

/**
 * <p>Project: SpringPro - OrderDetailsDaoImpl</p>
 * <p>Powered by yzc On 2023-10-23 15:13:08</p>
 * <p>描述：<p>
 *
 * @author yzc [yzc0415@126.com]
 * @version 1.0
 * @since 17
 */
@Repository
public class OrderDetailsDaoImpl implements OrderDetailsDao {
    @Autowired
    JdbcTemplate jdbcTemplate;


    @Override
    public int saveOrderDerails(String oid, String goodid, String goodname, double price, int number,
                                int ordersId) {
        String sql = "insert into orderdetails(oid,goodid,goodname,price,number,ordersId) values(?,?,?,?,?,?)";
       

        int rs = jdbcTemplate.update(sql, oid, goodid, goodname, price, number, ordersId);
        return rs;
    }
}
